package com.google.gwt.sample.dynatablerf.server;

import com.google.gwt.sample.dynatablerf.server.business.ControladorFactory;
import com.google.gwt.sample.dynatablerf.server.domain.TipoInstalacao;
import com.google.web.bindery.requestfactory.shared.Locator;

public class TipoInstalacaoLocator extends Locator<TipoInstalacao, Long> {

	@Override
	public TipoInstalacao create(Class<? extends TipoInstalacao> clazz) {
		return new TipoInstalacao();
	}

	@Override
	public TipoInstalacao find(Class<? extends TipoInstalacao> clazz, Long id) {
		return ControladorFactory.getControladorTipoInstalacao().findById(id);
	}

	@Override
	public Class<TipoInstalacao> getDomainType() {
		return TipoInstalacao.class;
	}

	@Override
	public Long getId(TipoInstalacao domainObject) {
		return domainObject.getId();
	}

	@Override
	public Class<Long> getIdType() {
		return Long.class;
	}

	@Override
	public Object getVersion(TipoInstalacao domainObject) {
		return domainObject.getVersion();
	}


}
